package cn.broadin.app.hotel.component;

import android.content.Context;

import java.util.ArrayList;
import java.util.List;

import cn.broadin.app.hotel.HomeActivity;
import cn.broadin.app.hotel.R;

public class DefaultDataService {

    /**
     * 系统默认数据，请勿随意修改
     * @param context
     * @return
     */
    public static List<BaseView> findDefaultViews(Context context){
        List<BaseView> tmpViews = new ArrayList<>();
        // 初始化log视图
        CardViewData logoData = new CardViewData();
        logoData.setLayout(402, 76, 96, 60);
        logoData.defaultResId = R.drawable.logo_new;
        CardView logo = CardView.newInstance(context, logoData);
        tmpViews.add(logo);
        // 初始化时间视图
        TimePickerViewData timePickerViewData = new TimePickerViewData();
        timePickerViewData.setLayout(500, 60, 1374, 75);
        timePickerViewData.textColor = "#ffffff";
        timePickerViewData.textSize = 42;
        TimePickerView timePickerView = TimePickerView.newInstance(context, timePickerViewData);
        tmpViews.add(timePickerView);
        // 直播视图
        LiveViewData liveViewData = new LiveViewData();
        liveViewData.setLayout(688, 659, 134, 254);
        liveViewData.focusable = true;
        liveViewData.clickable = true;
        liveViewData.url = "";
        LiveView liveView = LiveView.newInstance(context, liveViewData);
        tmpViews.add(liveView);
        // 直播播放视图
        CardViewData liveCardViewData = new CardViewData();
        liveCardViewData.setLayout(303, 441, 840, 254);
        liveCardViewData.focusable = true;
        liveCardViewData.clickable = true;
        liveCardViewData.defaultResId = R.drawable.video_new;
        liveCardViewData.link = CardViewData.TYPE_START_APP;
        liveCardViewData.params = "{'pkg':'com.hotel.player','cls':'com.hotel.player.PlayerActivity'}";
        CardView liveCardView = CardView.newInstance(context, liveCardViewData);
        tmpViews.add(liveCardView);
        // 视频点播视图
        CardViewData videoCardViewData = new CardViewData();
        videoCardViewData.setLayout(624, 223, 1161, 254);
        videoCardViewData.focusable = true;
        videoCardViewData.clickable = true;
        videoCardViewData.defaultResId = R.drawable.live_new;
        videoCardViewData.authable = true;
        videoCardViewData.link = CardViewData.TYPE_START_APP;
        videoCardViewData.params = "{'pkg':'com.starcor.hunan','cls':'com.starcor.hunan.SplashActivity'}";
        CardView videoCardView = CardView.newInstance(context, videoCardViewData);
        tmpViews.add(videoCardView);
        // 视频点播封面视图
        CardViewData videoCoverCardViewData = new CardViewData();
        videoCoverCardViewData.setLayout(249, 248, 1501, 219);
        videoCoverCardViewData.defaultResId = R.drawable.video_bg;
        videoCoverCardViewData.zindex = 1;
        CardView videoCoverCardView = CardView.newInstance(context, videoCoverCardViewData);
        tmpViews.add(videoCoverCardView);
        // 音乐视图
        CardViewData musicCardViewData = new CardViewData();
        musicCardViewData.setLayout(303, 200, 1161, 495);
        musicCardViewData.focusable = true;
        musicCardViewData.clickable = true;
        musicCardViewData.defaultResId = R.drawable.music_new;
        musicCardViewData.link = CardViewData.TYPE_START_APP;
        musicCardViewData.params = "{'pkg':'st.com.xiami','cls':'com.yunos.xiami.activity.MainActivity'}";
        CardView musicCardView = CardView.newInstance(context, musicCardViewData);
        tmpViews.add(musicCardView);
        // 新闻资源视图
        CardViewData newsCardViewData = new CardViewData();
        newsCardViewData.setLayout(303, 200, 1482, 495);
        newsCardViewData.focusable = true;
        newsCardViewData.clickable = true;
        newsCardViewData.defaultResId = R.drawable.photo_new;
        newsCardViewData.link = CardViewData.TYPE_START_APP;
        newsCardViewData.params = "{'pkg':'cn.meijx.app.album','cls':'cn.meijx.app.album.WelcomeActivity'}";
        CardView newsCardView = CardView.newInstance(context, newsCardViewData);
        tmpViews.add(newsCardView);
        // 广告海报视图
        CardViewData advCardViewData = new CardViewData();
        advCardViewData.setLayout(624, 200, 840, 713);
        advCardViewData.focusable = true;
        advCardViewData.clickable = true;
        advCardViewData.defaultResId = R.drawable.adv_bg;
        advCardViewData.link = CardViewData.TYPE_START_APP;
        advCardViewData.params = "{'pkg':'com.hotel.catchup','cls':'com.hotel.catchup.PlayerActivity'}";
        CardView advCardView = CardView.newInstance(context, advCardViewData);
        tmpViews.add(advCardView);
        // 系统设置
        CardViewData settingsCardViewData = new CardViewData();
        settingsCardViewData.setLayout(303, 200, 1482, 713);
        settingsCardViewData.focusable = true;
        settingsCardViewData.clickable = true;
        settingsCardViewData.defaultResId = R.drawable.setting_new;
        settingsCardViewData.link = CardViewData.TYPE_START_ACTIVITY;
        settingsCardViewData.slink = CardViewData.STYPE_SETTYINGS;
        CardView settingsCardView = CardView.newInstance(context, settingsCardViewData);
        tmpViews.add(settingsCardView);

        return tmpViews;
    }
}
